function g=probsWithStandingStill(x)
%% The function probsWithStandingStill has the equations of probabilities 
%% where the ship will be after 2 steps if it can also stand still.
global nSize

n=nSize;

%Probabiltiy to go forwards
p=x(1);
%Probabiliy to stand still
s=x(2);
%Probabilty to go backwards
b=1-n*p-s;


%Prob to be at the same place after 2 steps
g(1)=s*s+n*p*b+b*b;
% prob to be one in front
g(2)=p*s+s*p;
% prob to be two in front
g(3)=p*p;
% prob to be one behind
g(4)=b*s+s*b;
%prob to be two behind
g(5)=b*p;



end